package org.dawfinn.droiditarian.server.data;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Email;
import com.google.appengine.api.datastore.Key;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class User {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	@Persistent
	private Email email;
	@Persistent
	private String passwordHash;
	@Persistent
	private String currentSid;

	public User(Email email, String passwordHash) {
		super();
		this.email = email;
		this.passwordHash = passwordHash;
	}

	public Email getEmail() {
		return email;
	}

	public void setEmail(Email email) {
		this.email = email;
	}

	public String getPasswordHash() {
		return passwordHash;
	}

	public void setPasswordHash(String passwordHash) {
		this.passwordHash = passwordHash;
	}

	public Key getKey() {
		return key;
	}

	public String getCurrentSid() {
		return currentSid;
	}

	public void setCurrentSid(String currentSid) {
		this.currentSid = currentSid;
	}

}
